# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="Libjingle and Jingle-Audio  are proposed extensions to XMPP to interoperate with peer-to-peer and voice calling capabilities."
HOMEPAGE="https://sourceforge.net/projects/libjingle/"
SRC_URI="mirror://sourceforge/libjingle/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="x86"
IUSE="speex ilbc"

DEPEND="net-libs/ortp"
RDEPEND="
		speex? ( >=media-libs/speex-1.1.6 )
		ilbc? ( dev-libs/ilbc-rfc3951 )
"

src_unpack() {
	unpack ${A}
	cd ${S}	
}

src_compile() {
	use speex && myconf="--with-speex" 
	use ilbc && myconf="--with-ilbc"
	libtoolize --copy --force
	econf ${myconf} || die
	emake || die
}

src_install() {
	make DESTDIR=${D} install || die "Install failed!"
}
